package com.dogkr.server.entity;

import java.math.BigDecimal;
import java.util.Date;

public class HostApply {
	
	public static short STATUS_DISABLE = 1;
	public static short STATUS_NEW = 100;
	public static short STATUS_NORMAL = 300;
	
    private Long id;

    private Long userId;

    private Long hostId;

    private String userTel;

    private String userCard;

    private Short hostHouseType;

    private String hostHouseName;

    private Short hostExperience;

    private BigDecimal serverVal;

    private Date lastModifydate;

    private Date createDate;

    private Short status;

    private String auditor;

    private String hostAddress;

    private String userDescribe;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public Long getHostId() {
        return hostId;
    }

    public void setHostId(Long hostId) {
        this.hostId = hostId;
    }

    public String getUserTel() {
        return userTel;
    }

    public void setUserTel(String userTel) {
        this.userTel = userTel;
    }

    public String getUserCard() {
        return userCard;
    }

    public void setUserCard(String userCard) {
        this.userCard = userCard;
    }

    public Short getHostHouseType() {
        return hostHouseType;
    }

    public void setHostHouseType(Short hostHouseType) {
        this.hostHouseType = hostHouseType;
    }

    public String getHostHouseName() {
        return hostHouseName;
    }

    public void setHostHouseName(String hostHouseName) {
        this.hostHouseName = hostHouseName;
    }

    public Short getHostExperience() {
        return hostExperience;
    }

    public void setHostExperience(Short hostExperience) {
        this.hostExperience = hostExperience;
    }

    public BigDecimal getServerVal() {
		return serverVal;
	}

	public void setServerVal(BigDecimal serverVal) {
		this.serverVal = serverVal;
	}

	public Date getLastModifydate() {
        return lastModifydate;
    }

    public void setLastModifydate(Date lastModifydate) {
        this.lastModifydate = lastModifydate;
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    public Short getStatus() {
        return status;
    }

    public void setStatus(Short status) {
        this.status = status;
    }

    public String getAuditor() {
        return auditor;
    }

    public void setAuditor(String auditor) {
        this.auditor = auditor;
    }

    public String getHostAddress() {
        return hostAddress;
    }

    public void setHostAddress(String hostAddress) {
        this.hostAddress = hostAddress;
    }

    public String getUserDescribe() {
        return userDescribe;
    }

    public void setUserDescribe(String userDescribe) {
        this.userDescribe = userDescribe;
    }

	public void create(User user) {
		this.userId = user.getId();
		this.createDate = new Date();
		this.status = STATUS_NEW;
	}

	public void update(HostApply apply) {
		this.userTel = apply.getUserTel();
		this.userCard = apply.getUserCard();
		this.hostHouseType = apply.getHostHouseType();
		this.hostHouseName = apply.getHostHouseName();
		this.hostExperience = apply.getHostExperience();
		this.serverVal = apply.getServerVal();
		this.lastModifydate = new Date();
		this.hostAddress = apply.getHostAddress();
		this.userDescribe = apply.getUserDescribe();
	}
}